using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Dimok.Data.Database;

namespace Data.DataSources {
	public class StateTablesDataSource : ObjectDataSourceBase {
		public override string SelectViewName { get { return "fn_StateTables()"; } }
		public override string InsertViewName { get{ return ""; }}
		public StateTablesDataSource() {}

		public override DataView SelectEx() {
			return SelectEx(false);
		}
		public DataView SelectEx(bool ActiveOnly) {
			DataSet ds = SQL.ExecuteDataset("SELECT * FROM fn_StateTables" + (ActiveOnly ? "_Active" : "") + "() ORDER BY TableName");
			return ds.Tables[0].DefaultView;
		}

	}
}